package com.ruoyi.bl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bl.mapper.BlUsersMapper;
import com.ruoyi.bl.domain.BlUsers;
import com.ruoyi.bl.service.IBlUsersService;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-24
 */
@Service
public class BlUsersServiceImpl implements IBlUsersService
{
    @Autowired
    private BlUsersMapper blUsersMapper;

    /**
     * 查询用户信息
     * 
     * @param userId 用户信息主键
     * @return 用户信息
     */
    @Override
    public BlUsers selectBlUsersByUserId(Long userId)
    {
        return blUsersMapper.selectBlUsersByUserId(userId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param blUsers 用户信息
     * @return 用户信息
     */
    @Override
    public List<BlUsers> selectBlUsersList(BlUsers blUsers)
    {
        return blUsersMapper.selectBlUsersList(blUsers);
    }

    /**
     * 新增用户信息
     * 
     * @param blUsers 用户信息
     * @return 结果
     */
    @Override
    public int insertBlUsers(BlUsers blUsers)
    {
        blUsers.setCreateTime(DateUtils.getNowDate());
        return blUsersMapper.insertBlUsers(blUsers);
    }

    /**
     * 修改用户信息
     * 
     * @param blUsers 用户信息
     * @return 结果
     */
    @Override
    public int updateBlUsers(BlUsers blUsers)
    {
        blUsers.setUpdateTime(DateUtils.getNowDate());
        return blUsersMapper.updateBlUsers(blUsers);
    }

    /**
     * 批量删除用户信息
     * 
     * @param userIds 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteBlUsersByUserIds(Long[] userIds)
    {
        return blUsersMapper.deleteBlUsersByUserIds(userIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param userId 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteBlUsersByUserId(Long userId)
    {
        return blUsersMapper.deleteBlUsersByUserId(userId);
    }
}
